import "./assets/main.css";
import "./assets/icon/iconfont.css";
import "./assets/icon/iconfont.js";
import "weui";
import "./assets/weuix.css";

import Vue from "vue";
import App from "./App.vue";
import router from "./router";
import store from "./store";
import weui from "weui.js";
import moment from 'moment'

import api from "./api/index"; 

//weui支持
Vue.prototype.$weui = weui;
//cookie支持
var VueCookie = require('vue-cookie');
Vue.use(VueCookie);
//api挂载
Vue.prototype.$api = api;
//monent挂载
Vue.prototype.$moment = moment

//开发环境配置
if(process.env.NODE_ENV!=="production"){
    //VueCookie.set("wx910gzh",'{"OPEN_ID":"oHeX2sl9Wvs4Yyk8WyLDuRrgCVgg"}')
}

//错误提示是否显示
Vue.config.productionTip = false;

//检查是否cookie
// var user_info = JSON.parse(VueCookie.get("wx910gzh"));
// if (user_info != null) {
//     if (user_info.OPEN_ID){
        //构建vue
        new Vue({                        
            router: router,
            store: store,
            render: h => h(App),
        }).$mount('#app')
//     }
//     else{
//         alert('无效用户凭证')
//         //router.replace({name:'MessagePage',query:{INFO:'无效用户凭证',SUCCESS:false}});
//     }
// }
// else{
//     alert('无效用户凭证')
//     //router.replace({name:'MessagePage',query:{INFO:'无效用户凭证',SUCCESS:false}});
// }